<?php $this->beginContent('//layouts/main');?>
<?php $action = (Yii::app()->user->isAdmin()) ? 'admin' : 'operator';?>
                    <div class="col-lg-3">
                        <div class="panel panel-info">
                            <div class="panel-heading">
                                <?php echo Yii::t('app', 'Data Perizinan'); ?>
                            </div>
                                <?php
                                $this->menu = array(
                                            array(
                                                'label'=>'Semua Data Perizinan',
                                                'visible'=>Yii::app()->user->isOperator() || Yii::app()->user->isAdmin(),
                                                'url'=>array('izin/'.$action)
                                            ),
                                            array(
                                                'label'=>'Pengolahan Minyak Bumi',
                                                'visible'=>(Yii::app()->user->isOperatorMB() || Yii::app()->user->isOperator() || Yii::app()->user->isAdmin()),
                                                'url'=>array('izin/'.$action.'/1')
                                            ),
                                            array(
                                                'label'=>'Pengolahan Gas Bumi',
                                                'visible'=>(Yii::app()->user->isOperatorGB() || Yii::app()->user->isOperator() || Yii::app()->user->isAdmin()),
                                                'url'=>array('izin/'.$action.'/2')
                                            ),
                                            array(
                                                'label'=>'Pengolahan Hasil Olahan',
                                                'visible'=>(Yii::app()->user->isOperatorHO() || Yii::app()->user->isOperator() || Yii::app()->user->isAdmin()),
                                                'url'=>array('izin/'.$action.'/3')
                                            ),
                                        );
                                $this->widget('zii.widgets.CMenu', array(
                                    'items'=>$this->menu,
                                    'htmlOptions'=>array('class'=>'nav nav-pills nav-stacked'),
                                ));
                                ?>
                        </div>
                        <?php if(Yii::app()->user->isAdmin()):?>
                        <div class="panel panel-info">
                            <div class="panel-heading">
                                <?php echo Yii::t('app', 'Data Rujukan'); ?>
                            </div>
                                <?php
                                $this->menu = array(
                                            array(
                                                'label'=>'Persyaratan Administrasi',
                                                'url'=>array('administrasi/admin')
                                            ),
                                            array(
                                                'label'=>'Persyaratan Teknis',
                                                'url'=>array('teknis/admin')
                                            ),
                                            array(
                                                'label'=>'Izin Usaha',
                                                'url'=>array('perizinan/admin')
                                            ),
                                            array(
                                                'label'=>'Surat Terkait',
                                                'url'=>array('suratTerkait/admin')
                                            ),
                                            array(
                                                'label'=>'Evaluasi',
                                                'url'=>array('evaluasi/admin')
                                            ),
//                                            array(
//                                                'label'=>'Pelaporan',
//                                                'url'=>array('pelaporan/admin')
//                                            ),
                                            array(
                                                'label'=>'Lain-lain',
                                                'url'=>array('lainLain/admin')
                                            ),
                                            array(
                                                'label'=>'Satuan',
                                                'url'=>array('satuan/admin')
                                            ),
                                        );
                                $this->widget('zii.widgets.CMenu', array(
                                    'items'=>$this->menu,
                                    'htmlOptions'=>array('class'=>'nav nav-pills nav-stacked'),
                                ));
                                ?>
                        </div>
                        <div class="panel panel-info">
                            <div class="panel-heading">
                                <?php echo Yii::t('app', 'Data Lokasi'); ?>
                            </div>
                                <?php
                                $this->menu = array(
                                            array(
                                                'label'=>'Provinsi',
                                                'url'=>array('provinsi/admin')
                                            ),
                                            array(
                                                'label'=>'Kabupaten',
                                                'url'=>array('kabupaten/admin')
                                            ),
                                        );
                                $this->widget('zii.widgets.CMenu', array(
                                    'items'=>$this->menu,
                                    'htmlOptions'=>array('class'=>'nav nav-pills nav-stacked'),
                                ));
                                ?>
                        </div>
                        <div class="panel panel-info">
                            <div class="panel-heading">
                                <?php echo Yii::t('app', 'Manajemen Pengguna'); ?>
                            </div>
                                <?php
                                $this->menu = array(
                                            array(
                                                'label'=>'Hak Akses',
                                                'url'=>array('role/admin')
                                            ),
                                            array(
                                                'label'=>'Data User',
                                                'url'=>array('user/admin')
                                            ),
                                        );
                                $this->widget('zii.widgets.CMenu', array(
                                    'items'=>$this->menu,
                                    'htmlOptions'=>array('class'=>'nav nav-pills nav-stacked'),
                                ));
                                ?>
                        </div>
                        <?php endif;?>
                    </div>
                    <div class="col-lg-9">
                        <?php echo $content; ?>
                    </div>
<?php $this->endContent();?>